﻿using BoriPeter.NutritionFileSource.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace BoriPeter.NutritionFileSource.Models
{
    [XmlRoot("foods")]
    [XmlInclude(typeof(HistoryItem))]
    public class HistoryList : IXMLList<HistoryItem>
    {
        [XmlElement("food")]
        public List<HistoryItem> FoodList { get; set; }

        public HistoryList(List<HistoryItem> HistoryList)
        {
            this.FoodList = HistoryList;
        }

        public HistoryList()
        {

        }

        public List<HistoryItem> GetItems()
        {
            return FoodList;
        }


        public void SetItems(List<HistoryItem> _list)
        {
            FoodList = _list;
        }
    }
}
